<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>作业2</title>
</head>
<body>
<script>
    //2.输出1-1000之间能被5整除的数，并且每行输出3个
    var str = "", count = 0;
    for (let i = 1; i < 1001; i++) {
        if (i % 5 == 0) {
            str += i+" ";
            count++;
            if (count%3==0){
                str+="\n";
            }
        }
    }
    console.log(str);
</script>
</body>
</html>